home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19960209-19960425 / 000243_news@columbia.edu _Wed Mar 20 11:22:49 1996.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: news@columbia.edu
  2. Received: from apakabar.cc.columbia.edu (apakabar.cc.columbia.edu [128.59.35.159]) by watsun.cc.columbia.edu (8.7.3/8.7.3) with ESMTP id LAA09778 for <kermit.misc@watsun>; Wed, 20 Mar 1996 11:22:48 -0500 (EST)
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.7.3/8.7.3) id LAA14100 for kermit.misc@watsun; Wed, 20 Mar 1996 11:22:43 -0500 (EST)
  4. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  5. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: How to get string with '\' into take script?
  8. Date: 20 Mar 1996 16:22:26 GMT
  9. Organization: Columbia University
  10. Lines: 38
  11. Message-ID: <4ipbc2$doe@apakabar.cc.columbia.edu>
  12. References: <31418faf.52414e414848@ranahh.hanse.de> <4hvpm2$ilp@apakabar.cc.columbia.edu> <314dba9e.52414e414848@ranahh.hanse.de> <314efc48.52414e414848@ranahh.hanse.de>
  13. NNTP-Posting-Host: watsun.cc.columbia.edu
  14.  
  15. In article <314efc48.52414e414848@ranahh.hanse.de>,
  16. Volkmar Grote <vgrote@ranahh.hanse.de> wrote:
  17. : ...
  18. : ... and the funny difference between "output", "echo" and "write screen"
  19. : when it comes to backslashes.
  20. Here are the differences:
  21.  
  22.  1. ECHO and WRITE SCREEN treat backslashes the same way.  ECHO differs
  23.     from WRITE SCREEN by supplying the line terminator, whereas WRITE
  24.     SCREEN only writes the characters that you tell it to write.
  25.  
  26.  2. OUTPUT does something funny (funnier than usual :-) with backslashes,
  27.     as documented on page 278 of "Using C-Kermit" (p.322 of "C-Kermit
  28.     Einfuehrung u. Referenz"), namely, \b or \B == BREAK, \l or \L ==
  29.     Long Break, and (this is newer than the books) \n or \N == NUL.
  30.  
  31. This is amplified a little bit in the CKCKER.BWR file:
  32.  
  33. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  34. Long BREAK signal, and \N and \\N send a NUL (ASCII 0).  BREAK and Long BREAK
  35. are special signals, not characters, and NUL is a character that normally
  36. cannot be included in a C string, since it is the C string terminator.
  37.  
  38. If you really want to output a backslash followed by a B, an L, or an N (as is
  39. needed to configure certain modems, etc), use "output \fliteral(\B)" (can be
  40. abbreviated, e.g. "out \flit(\B)") -- same for L or N.  You can also use
  41. "output \\\\B" (yes, four backslashes); same for L or N.
  42.  
  43. (End quote)
  44.  
  45. Experimentation shows that when one or more successive backslashes are not
  46. followed by a B, L, or N (or b, l, or n) in an OUTPUT command, it behaves
  47. just like ECHO and WRITE SCREEN until we have four backslashes, and then
  48. it starts behaving differently.  Mea culpa.  I will have to investigate
  49. this one and fix the problem unless I can find a good excuse not to :-)
  50.  
  51. - Frank